<?php namespace smsapi;
#==============================================================================
# LTB Self Service Password
#
# Copyright (C) 2009-2017 Clement OUDOT
# Copyright (C) 2009-2017 LTB-project.org
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# GPL License: http://www.gnu.org/licenses/gpl.txt
#
#==============================================================================

class smsExample
{

    private $example_param1;
    private $example_param2;

    public function __construct($example_param1, $example_param2)
    {
         $this->example_param1 = $example_param1;
         $this->example_param2 = $example_param2;
    }

    /* @function boolean send_sms_by_api(string $mobile, string $message)
     * Send SMS trough an API
     * @param mobile mobile number
     * @param message text to send
     * @return 1 if message sent, 0 if not
     */
    function send_sms_by_api($mobile, $message) {

        # PHP code
        # ...

        # Or call to external script
        # $command = escapeshellcmd(/path/to/script).' '.escapeshellarg($mobile).' '.escapeshellarg($message);
        # exec($command);

        return 1;
    }
}
